<template>
	<view>
		<view class="serchbox">
			<input v-model="value" class="uni-input fs-28" placeholder-style="color:#ccc" placeholder="请输入种植名称进行快速搜索" />
			<view class="icon" @click="search"><u-icon name="search" color="#64C533" size="24"></u-icon></view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'uni-serch',
	data() {
		return {
			value:''
		};
	},
	methods:{
		search(){
			if(this.value == '')return
			this.$emit('search',this.value)
		}
	}
};
</script>

<style lang="scss">
page{
	background: #F6F6F6;
}
.serchbox {
	height: 70rpx;
	border: 1rpx solid #8dd16b;
	margin: 20rpx 30rpx;
	display: flex;
	justify-content: space-between;
	border-radius: 8rpx;
	overflow: hidden;
	input {
		height: 70rpx;
		line-height: 70rpx;
		padding-left: 18rpx;
		flex:1;
		background:#fff;
	}
	.icon{
		padding: 0 10rpx 0 20rpx;
		display: flex;
		background:#fff;
	}
}
</style>
